Optimal. Leaf size=192 \[ -\frac {2 \left (3 a^2 A b-A b^3+a^3 B-3 a b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 \left (a^3 A+9 a A b^2+9 a^2 b B+b^3 B\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 d}+\frac {2 a^2 (7 A b+3 a B) \sin (c+d x)}{3 d \sqrt {\cos (c+d x)}}-\frac {2 b^2 (a A-b B) \sqrt {\cos (c+d x)} \sin (c+d x)}{3 d}+\frac {2 a A (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.29, antiderivative size = 192, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3068, 3110,
3102, 2827, 2720, 2719} \begin {gather*} \frac {2 a^2 (3 a B+7 A b) \sin (c+d x)}{3 d \sqrt {\cos (c+d x)}}+\frac {2 \left (a^3 A+9 a^2 b B+9 a A b^2+b^3 B\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 d}-\frac {2 \left (a^3 B+3 a^2 A b-3 a b^2 B-A b^3\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}-\frac {2 b^2 (a A-b B) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}+\frac {2 a A \sin (c+d x) (a+b \cos (c+d x))^2}{3 d \cos ^{\frac {3}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 2827
Rule 3068
Rule 3102
Rule 3110
Rubi steps
\begin {align*} \int \frac {(a+b \cos (c+d x))^3 (A+B \cos (c+d x))}{\cos ^{\frac {5}{2}}(c+d x)} \, dx &=\frac {2 a A (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2}{3} \int \frac {(a+b \cos (c+d x)) \left (\frac {1}{2} a (7 A b+3 a B)+\frac {1}{2} \left (a^2 A+3 A b^2+6 a b B\right ) \cos (c+d x)-\frac {3}{2} b (a A-b B) \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {2 a^2 (7 A b+3 a B) \sin (c+d x)}{3 d \sqrt {\cos (c+d x)}}+\frac {2 a A (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}-\frac {4}{3} \int \frac {-\frac {1}{4} a \left (a^2 A+10 A b^2+9 a b B\right )+\frac {3}{4} \left (3 a^2 A b-A b^3+a^3 B-3 a b^2 B\right ) \cos (c+d x)+\frac {3}{4} b^2 (a A-b B) \cos ^2(c+d x)}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 a^2 (7 A b+3 a B) \sin (c+d x)}{3 d \sqrt {\cos (c+d x)}}-\frac {2 b^2 (a A-b B) \sqrt {\cos (c+d x)} \sin (c+d x)}{3 d}+\frac {2 a A (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}-\frac {8}{9} \int \frac {-\frac {3}{8} \left (a^3 A+9 a A b^2+9 a^2 b B+b^3 B\right )+\frac {9}{8} \left (3 a^2 A b-A b^3+a^3 B-3 a b^2 B\right ) \cos (c+d x)}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 a^2 (7 A b+3 a B) \sin (c+d x)}{3 d \sqrt {\cos (c+d x)}}-\frac {2 b^2 (a A-b B) \sqrt {\cos (c+d x)} \sin (c+d x)}{3 d}+\frac {2 a A (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}-\left (3 a^2 A b-A b^3+a^3 B-3 a b^2 B\right ) \int \sqrt {\cos (c+d x)} \, dx-\frac {1}{3} \left (-a^3 A-9 a A b^2-9 a^2 b B-b^3 B\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=-\frac {2 \left (3 a^2 A b-A b^3+a^3 B-3 a b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 \left (a^3 A+9 a A b^2+9 a^2 b B+b^3 B\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 d}+\frac {2 a^2 (7 A b+3 a B) \sin (c+d x)}{3 d \sqrt {\cos (c+d x)}}-\frac {2 b^2 (a A-b B) \sqrt {\cos (c+d x)} \sin (c+d x)}{3 d}+\frac {2 a A (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.17, size = 165, normalized size = 0.86 \begin {gather*} \frac {-6 \left (3 a^2 A b-A b^3+a^3 B-3 a b^2 B\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+2 \left (a^3 A+9 a A b^2+9 a^2 b B+b^3 B\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )+18 a^2 A b \sin (c+d x)+6 a^3 B \sin (c+d x)+b^3 B \sin (2 (c+d x))+2 a^3 A \tan (c+d x)}{3 d \sqrt {\cos (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1209\) vs.
\(2(230)=460\).
time = 0.68, size = 1210, normalized size = 6.30
method | result | size |
default | \(\text {Expression too large to display}\) | \(1210\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.14, size = 306, normalized size = 1.59 \begin {gather*} \frac {\sqrt {2} {\left (-i \, A a^{3} - 9 i \, B a^{2} b - 9 i \, A a b^{2} - i \, B b^{3}\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + \sqrt {2} {\left (i \, A a^{3} + 9 i \, B a^{2} b + 9 i \, A a b^{2} + i \, B b^{3}\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 3 \, \sqrt {2} {\left (i \, B a^{3} + 3 i \, A a^{2} b - 3 i \, B a b^{2} - i \, A b^{3}\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 3 \, \sqrt {2} {\left (-i \, B a^{3} - 3 i \, A a^{2} b + 3 i \, B a b^{2} + i \, A b^{3}\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, {\left (B b^{3} \cos \left (d x + c\right )^{2} + A a^{3} + 3 \, {\left (B a^{3} + 3 \, A a^{2} b\right )} \cos \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{3 \, d \cos \left (d x + c\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.34, size = 255, normalized size = 1.33 \begin {gather*} \frac {2\,\left (A\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )\,b^3+3\,A\,a\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )\,b^2\right )}{d}+\frac {B\,b^3\,\left (\frac {2\,\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )}{3}+\frac {2\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{3}\right )}{d}+\frac {6\,B\,a\,b^2\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {6\,B\,a^2\,b\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,A\,a^3\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{3\,d\,{\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {{\sin \left (c+d\,x\right )}^2}}+\frac {2\,B\,a^3\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {{\sin \left (c+d\,x\right )}^2}}+\frac {6\,A\,a^2\,b\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________